package ru.isys;

import java.io.IOException;

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.stream.XMLStreamException;
import javax.xml.transform.TransformerConfigurationException;

import org.xml.sax.helpers.DefaultHandler;

import ru.isys.activity.MainActivity;
import ru.isys.activity.MainActivityImpl;
import ru.isys.xml.util.builder.ModelBuilder;
import ru.isys.xml.util.prepare.PrepareUtil;

public class Main extends DefaultHandler
{
    public static final String REV_APPDATA_NAMESPASE = "http://smev.gosuslugi.ru/rev110801";
    public static final String XD_SIGNATURE_NAMESPASE = "http://www.w3.org/2000/09/xmldsig#";
    public static final String SOAP_ENV_NAMESPASE = "http://schemas.xmlsoap.org/soap/envelope/";

    public static void main(String... args) throws XMLStreamException, IOException, ParserConfigurationException
    {
        if (args.length == 0)
        {
            MainActivity activity = new MainActivityImpl();
            activity.startWorking();
        }
        else
        {
            try
            {
                ModelBuilder modelBuilder;
                modelBuilder = ModelBuilder.getInstance();
                PrepareUtil prepare = new PrepareUtil(args[0], "",modelBuilder);
                prepare.prepareModel();
            }
            catch (TransformerConfigurationException e)
            {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
    }
}
